<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css"> /* <![CDATA[ */
  @import "tigris-branding/css/tigris.css";
  @import "tigris-branding/css/inst.css";
  /* ]]> */</style>
<link rel="stylesheet" type="text/css" media="print"
  href="tigris-branding/css/print.css"/>
<script type="text/javascript" src="tigris-branding/scripts/tigris.js"></script>
<title>cvs2svn FAQ</title>
</head>

<body id="bodycol">
<div class="app">

<h1>cvs2svn FAQ</h1>

<p><strong>General:</strong></p>

<ol>

  <li><a href="#incremental">Does cvs2svn support incremental
    repository conversion?</a></li>

</ol>


<p><strong>Compatibility:</strong></p>

<ol>

  <li><a href="#psyco">Does cvs2svn run under Psyco?</a></li>

</ol>


<p><strong>How-to:</strong></p>

<ol>

  <li><a href="#repoaccess">How can I convert a CVS repository to
    which I only have remote access?</a></li>

  <li><a href="#partialconversion">How can I convert part of a CVS
    repository?</a></li>

  <li><a href="#onetoone">How can I convert separate projects in my
    CVS repository into a single Subversion repository?</a></li>

  <li><a href="#automation">I have hundreds of subprojects to convert
    and my options file is getting huge</a></li>

  <li><a href="#options-code">How can I define my own class and use it
    in my options file?</a></li>

  <li><a href="#inverted">How can I convert project <tt>foo</tt> so
    that <tt>trunk/tags/branches</tt> are inside of
    <tt>foo</tt>?</a></li>

  <li><a href="#oneatatime">What if I don't want to convert
    all of my projects at once?</a></li>

  <li><a href="#eol-fixup">How do I fix up end-of-line translation
    problems?</a></li>

  <li><a href="#path-symbol-transforms">I want a single project but
    tag-rewriting rules that vary by subdirectory.  Can this be
    done?</a></li>

  <li><a href="#cvsnt">How can I convert a CVSNT repository?</a></li>

  <li><a href="#osxsetup">How do I get cvs2svn to run on OS X
    10.5.5?</a></li>

</ol>


<p><strong>Problems:</strong></p>

<ol>

  <li><a href="#atticprob">I get an error "A CVS repository cannot
    contain both repo/path/file.txt,v and
    repo/path/Attic/file.txt,v".  What can I do?</a></li>

  <li><a href="#rcsfileinvalid">I get an error "ERROR:
    <i>filename</i>,v is not a valid ,v file."</a></li>

  <li><a href="#gdbm-nfs">gdbm.error: (45, 'Operation not supported')</a></li>

  <li><a href="#apple-single">When converting a CVS repository that
    was used on a Macintosh, some files have incorrect contents in
    SVN.</a></li>

  <li><a href="#rcsmissing">Using cvs2svn 1.3.x, I get an error "The
    command '['co', '-q', '-x,v', '-p1.1', '-kk',
    '/home/cvsroot/myfile,v']' failed" in pass 8.</a></li>

  <li><a href="#nonstandardntdb">Vendor branches created with
    "cvs import -b &lt;branch number&gt;" are not correctly
    handled.</a></li>

</ol>


<p><strong>Getting help:</strong></p>

<ol>

  <li><a href="#gettinghelp">How do I get help?</a></li>

  <li><a href="#infoneeded">What information should I
    include when requesting help?</a></li>

  <li><a href="#subscribing">How do I subscribe to a mailing list?</a></li>

  <li><a href="#reportingbugs">How do I report a bug?</a></li>

  <li><a href="#testcase">How can I produce a useful test case?</a></li>

  <li><a href="#commercialsupport">Does anybody offer commercial
    support for cvs2svn/cvs2git conversions?</a></li>

</ol>

<hr />


<h2>General:</h2>

<h3><a name="incremental" title="#incremental">Does cvs2svn support
incremental repository conversion?</a></h3>

<p>No.</p>

<p>Explanation: During the transition from CVS to Subversion, it would
sometimes be useful to have the new Subversion repository track
activity in the CVS repository for a period of time until the final
switchover.  This would require each conversion to determine what had
changed in CVS since the last conversion, and add those commits on top
of the Subversion repository.</p>

<p>Unfortunately, cvs2svn/cvs2git does <em>not</em> support
incremental conversions.  With some work it would be possible to add
this feature, but it would be difficult to make it robust.  The
trickiest problem is that CVS allows changes to the repository that
have retroactive effects (e.g., affecting parts of the history that
have already been converted).</p>

<p>Some conversion tools claim to support incremental conversions from
CVS, but as far as is known none of them are reliable.</p>

<p>Volunteers or sponsorship to add support for incremental
conversions to cvs2svn/cvs2git would be welcome.</p>

<hr />


<h2>Compatibility:</h2>

<h3><a name="psyco" title="#psyco">Does cvs2svn run under
Psyco?</a></h3>

<p>No.</p>

<p>Explanation: <a href="http://psyco.sourceforge.net/">Psyco</a> is a
python extension that can speed up the execution of Python code by
compiling parts of it into i386 machine code.  Unfortunately, Psyco is
known <em>not</em> to run cvs2svn correctly (this was last tested with
the Psyco pre-2.0 development branch).  When cvs2svn is run under
Psyco it crashes in <tt>OutputPass</tt> with an error message that
looks something like this:</p>

<pre>
cvs2svn_lib.common.InternalError: ID changed from 2 -> 3 for Trunk, r2
</pre>

<p>The Psyco team <a
href="https://sourceforge.net/tracker/?func=detail&amp;aid=2827082&amp;group_id=41036&amp;atid=429622">has
been informed about the problem</a>.</p>

<hr />


<h2>How-to:</h2>

<h3><a name="repoaccess" title="#repoaccess">How can I convert a CVS
repository to which I only have remote access?</a></h3>

<p>cvs2svn requires direct, filesystem access to a copy of the CVS
repository that you want to convert.  The reason for this requirement
is that cvs2svn directly parses the <tt>*,v</tt> files that make up
the CVS repository.</p>

<p>Many remote hosting sites provide access to backups of your CVS
repository, which could be used for a cvs2svn conversion.  For
example:</p>

<ul>
  <li><a href="http://sourceforge.net">SourceForge</a> allows CVS
    content to be accessed via
    <a href="http://sourceforge.net/docs/E04/en/#rsync">rsync</a>.  In
    fact, they provide <a
    href="http://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo#Usingcvs2svntocreateaSVNdumpfilefromCVScontent">complete instructions</a>
    for migrating a SourceForge project from CVS to SVN.</li>
  <li>...<i>(other examples welcome)</i></li>
</ul>

<p>If your provider does not provide any way to download your CVS
repository, there are two known tools that claim to be able to
clone a CVS repository via the CVS protocol:</p>

<ul>

  <li><a href="http://samba.org/ftp/tridge/rtc/cvsclone.l">cvsclone</a></li>

  <li><a href="http://cvs.m17n.org/~akr/cvssuck/">CVSsuck</a></li>

</ul>

<p>It should be possible to use one of these tools to fetch a copy of
your CVS repository from your provider, then to use cvs2svn to convert
the copy.  However, the developers of cvs2svn do not have any
experience with these tools, so you are on your own here.  If you try
one of them, please tell us about your experience on the <a
href="mailto:users@cvs2svn.tigris.org">users mailing list</a>.</p>


<h3><a name="partialconversion" title="#partialconversion">How can I
convert part of a CVS repository?</a></h3>

<p>This is easy: simply run cvs2svn normally, passing it the path of
the project subdirectory within the CVS repository.  Since cvs2svn
ignores any files outside of the path it is given, other projects
within the CVS repository will be excluded from the conversion.
</p>

<p>Example: You have a CVS repository at path <tt>/path/cvsrepo</tt>
with projects in subdirectories <tt>/path/cvsrepo/foo</tt> and
<tt>/path/cvsrepo/bar</tt>, and you want to create a new Subversion
repository at <tt>/path/foo-svn</tt> that includes only the
<tt>foo</tt> project:
</p>

<pre>
    $ cvs2svn -s /path/foo-svn /path/cvsrepo/foo
</pre>


<h3><a name="onetoone" title="#onetoone">How can I convert separate
projects in my CVS repository into a single Subversion
repository?</a></h3>

<p>This question assumes that you will convert all of your projects at
the same time.  If you must convert your projects at different times,
please see <a href="#oneatatime">What if I don't want to convert all
of my projects at once?</a></p>

<p>cvs2svn supports multiproject conversions, but you have to use the
<a href="cvs2svn.html#options-file-method">options file method</a> to
start the conversion.  In your options file, you simply call
<tt>run_options.add_project()</tt> once for each sub-project in your
repository.  For example, if your CVS repository has the layout:</p>

<pre>
  /project-a
  /project-b
</pre>

  <p>and you want your Subversion repository to be laid out like this:</p>

<pre>
   project-a/
      trunk/
         ...
      branches/
         ...
      tags/
         ...
   project-b/
      trunk/
         ...
      branches/
         ...
      tags/
         ...
</pre>

<p>then you need to have a section like this in your options file:</p>

<pre>
run_options.add_project(
    'my/cvsrepo/project-a',
    trunk_path='project-a/trunk',
    branches_path='project-a/branches',
    tags_path='project-a/tags',
    symbol_transforms=[
        #...whatever...
        ],
    symbol_strategy_rules=[
        #...whatever...
        ],
    )
run_options.add_project(
    'my/cvsrepo/project-b',
    trunk_path='project-b/trunk',
    branches_path='project-b/branches',
    tags_path='project-b/tags',
    symbol_transforms=[
        #...whatever...
        ],
    symbol_strategy_rules=[
        #...whatever...
        ],
    )
</pre>


<h3><a name="automation" title="#automation">I have hundreds of
    subprojects to convert and my options file is getting
    huge</a></h3>

<p>The options file is Python code, executed by the Python
interpreter.  This makes it easy to automate parts of the
configuration process.  For example, to add many subprojects, you can
write a Python loop:</p>

<pre>
projects = ['A', 'B', 'C', ...etc...]

cvs_repo_main_dir = r'test-data/main-cvsrepos'
for project in projects:
    run_options.add_project(
        cvs_repo_main_dir + '/' + project,
        trunk_path=(project + '/trunk'),
        branches_path=(project + '/branches'),
        tags_path=(project + '/tags'),
        # ...
        )
</pre>

<p>or you could even read the subprojects directly from the CVS
repository:</p>

<pre>
import os
cvs_repo_main_dir = r'test-data/main-cvsrepos'
projects = os.listdir(cvs_repo_main_dir)

# Probably you don't want to convert CVSROOT:
projects.remove('CVSROOT')

for project in projects:
    # ...as above...
</pre>


<h3><a name="options-code" title="#options-code">How can I define my
    own class and use it in my options file?</a></h3>

  <p>It is possible to customize your conversion using arbitrary
    Python code.  Sometimes this requires you to define your own
    Python class.  For technical reasons, such classes should not be
    defined within the options file but rather in a separate file that
    is imported into the options file.</p>

  <p>[Technical explanation: The problem is that class instances used
    in <tt>run_options</tt> are pickled in pass1 then unpickled in
    later passes.  (Pickling is a Python mechanism for storing objects
    to a file.)  But class instances can only be unpickled if the
    class can be imported at the time of unpickling.  This, in turns,
    requires the class to be defined at the top level of a Python
    module.  The options file is <em>not</em> a valid Python module;
    among other things, it is loaded using execfile(), not by being
    imported.]</p>

  <p>So create a separate file with a <tt>*.py</tt> filename,
    like <tt>myoptionsclasses.py</tt>.  In that file, do any imports
    needed by your code, then define your class:</p>

<pre>
from cvs2svn_lib.symbol_transform import SymbolTransform

class MySymbolTransform(SymbolTransform):
    def transform(self, cvs_file, symbol_name, revision):
        [...]
</pre>

  <p>Then, in your main options file, import the class and use it:</p>

<pre>
from myoptionsclasses import MySymbolTransform

run_options.add_project(
    [...]
    symbol_transforms=[
        MySymbolTransform(),
        ...
        ])
</pre>


<h3><a name="inverted" title="#inverted">How can I convert project
    <tt>foo</tt> so that <tt>trunk/tags/branches</tt> are inside of
    <tt>foo</tt>?</a></h3>

  <p>If <tt>foo</tt> is the only project that you want to convert,
    then either run cvs2svn like this:</p>

<pre>
   $ cvs2svn --trunk=foo/trunk --branches=foo/branches --tags=foo/tags CVSREPO/foo
</pre>

  <p>or use an options file that defines a project like this:</p>

<pre>
run_options.add_project(
    'my/cvsrepo/foo',
    trunk_path='foo/trunk',
    branches_path='foo/branches',
    tags_path='foo/tags',
    symbol_transforms=[
        #...whatever...
        ],
    symbol_strategy_rules=[
        #...whatever...
        ],
    )
</pre>

  <p>If <tt>foo</tt> is not the only project that you want to convert,
    then you need to do a multiproject conversion; see <a
    href="#onetoone">How can I convert separate projects in my CVS
    repository into a single Subversion repository?</a> for more
    information.</p>


<h3><a name="oneatatime" title="#oneatatime">What if I don't want to convert
    all of my projects at once?</a></h3>

<p>Suppose you need to convert some CVS projects to
  Subversion <b>now</b> and other projects <b>later</b>.  This
  situation is typically encountered in large organizations where each
  project has a separate lifecycle and schedule, and a one-step
  conversion process is not practical.</p>

<p>First you have to decide whether you want to put your converted
  projects into a single Subversion repository or multiple
  repositories.  This is mostly an administrative decision and is
  beyond the scope of this FAQ.
  See <a href="http://svnbook.red-bean.com/en/1.2/svn.reposadmin.projects.html#svn.reposadmin.projects.chooselayout">the
  Subversion book</a> for a discussion of repository organization.</p>

<p>If you decide to convert your projects into separate Subversion
  repositories, then please follow the instructions
  in <a href="#partialconversion">How can I convert part of a CVS
  repository?</a>, once for each repository.</p>

<p>If, on the other hand, you want to convert the CVS projects at
  different times but put them into a single Subversion repository,
  then you need to follow the instructions in this section.</p>

<p><b>NOTE:</b> importing projects one at a time into a single
  Subversion repository will usually break date-based range commands
  (e.g. <tt>svn diff -r {2002-02-17:2002-03-18}</tt>) for the
  overlapping dates.  This is because Subversion uses a bisect-based
  search to locate commits from a given date, and this algorithm fails
  for non-monotonic dates.  While this is not the end of the world, it
  can be an inconvenience.</p>

<p>Remember that a multiproject Subversion repository should usually
  be laid out like this:</p>

<pre>
   project-a/
      trunk/
         ...
      branches/
         ...
      tags/
         ...
   project-b/
      trunk/
         ...
      branches/
         ...
      tags/
         ...
</pre>

<p>Note that each project has its own top-level directory that
  contains <tt>trunk</tt>, <tt>branches</tt>, and <tt>tags</tt>
  subdirectories.  The procedure is to convert each project separately
  to a dumpfile with the following directory structure:</p>

<pre>
   project-a/
      trunk/
         ...
      branches/
         ...
      tags/
         ...
</pre>

<p>and then to load the dumpfile into the Subversion repository
  using <tt>svnadmin load</tt>.</p>

<p>Example:</p>

<ol>
  <li>If the svn repository doesn't already exist, create it:
    <pre>
      svnadmin create /path/to/svnrepos
    </pre></li>

  <li>Remember to <b>make a backup</b> before starting.  Never run
    cvs2svn on a live CVS repository--always work on a copy of your
    repository.</li>

  <li>Run cvs2svn against one of the projects that you want converted:
    <pre>
      # Create a dumpfile containing the new CVS repository contents
      $ cvs2svn --dumpfile=/tmp/project-a.dump \
                --trunk=project-a/trunk \
                --branches=project-a/branches \
                --tags=project-a/tags \
                /path/to/cvsrepo/project-a
    </pre></li>


  <li>Use <tt>svnadmin load</tt> to import the dump into the
  Subversion repository:
    <pre>
      $ cd ~/svndump
      $ svnadmin load /path/to/svnrepos &lt;/tmp/project-a.dump
    </pre></li>

  <li>Repeat steps 3 and 4 for each module you want to convert.</li>

</ol>

<p>Variations:</p>

<ul>

  <li>It is possible to convert more than one CVS repository per
    batch; to do so, see <a href="#onetoone">How can I convert
    separate projects in my CVS repository into a single Subversion
    repository?</a>, remembering to have cvs2svn write its output to a
    dumpfile each time.</li>

  <li>For more complicated directory arrangements, it might be
    necessary to use <tt>svnadmin load</tt>'s <tt>--parent-dir</tt>
    option to place directories in their final location.  For example,
    suppose you want the following layout in Subversion:

<pre>
   server/
       project-a/
       project-b/
   client/
       project-c/
       project-d/
</pre>

    but you want to convert <tt>project-a</tt> and <tt>project-b</tt>
    at different times.  The above recipe will not work, because
    <tt>svnadmin load</tt> would give an error when <tt>project-b</tt>
    tries to create directory <tt>server/</tt>, because the directory
    already exists from when <tt>project-a</tt> was loaded.  The
    solution is to convert <tt>project-b</tt> as a top-level project:
    <pre>
      $ cvs2svn --dumpfile=/tmp/project-b.dump \
                /path/to/cvsrepo/project-b
    </pre>
    but then load it using the <tt>--parent-dir</tt> option:
    <pre>
      $ svnadmin load --parent-dir=project-b /path/to/svnrepos &lt;/tmp/project-b.dump
    </pre>
  </li>

</ul>



<h3><a name="eol-fixup" title="#eol-fixup">How do I fix up end-of-line
  translation problems?</a></h3>

  <p>Warning: cvs2svn's handling of end-of-line options changed
    between version 1.5.x and version 2.0.x.  <strong>This
    documentation applies to version 2.0.x and later.</strong>  The
    documentation applying to an earlier version can be found in the
    <tt>www</tt> directory of that release of cvs2svn.</p>

  <p>Starting with version 2.0, the default behavior of cvs2svn is to
    treat all files as binary except those explicitly determined to be
    text.  (Previous versions treated files as text unless they were
    determined to be binary.)  This behavior was changed because,
    generally speaking, it is safer to treat a text file as binary
    than vice versa.</p>

  <p>However, it is often preferred to set
    <tt>svn:eol-style=native</tt> for text files, so that their
    end-of-file format is converted to that of the client platform
    when the file is checked out.  This section describes how to
    get the settings that you want.</p>

  <p>If a file is marked as binary in CVS (with <tt>cvs admin
    -kb</tt>, then cvs2svn will always treat the file as binary.  For
    other files, cvs2svn has a number of options that can help choose
    the correct end-of-line translation parameters during the
    conversion:</p>

    <table border="1" cellpadding="10" cellspacing="3" width="80%">

      <tr>
        <td align="right"><tt>--auto-props=FILE</tt></td>
        <td>

          <p>Set arbitrary Subversion properties on files based on the
            auto-props section of a file in svn config format.  The
            auto-props file might have content like this:</p>

<pre>
[auto-props]
*.txt = svn:mime-type=text/plain;svn:eol-style=native
*.doc = svn:mime-type=application/msword;!svn:eol-style
</pre>

          <p>This option can also be used in combination with
            <tt>--eol-from-mime-type</tt>.</p>

          <p>To force end-of-line translation off, use a setting of
            the form <tt>!svn:eol-style</tt> (with a leading
            exclamation point).</p>

        </td>
      </tr>

      <tr>
        <td align="right"><tt>--mime-types=FILE</tt></td>
        <td><p>Specifies an Apache-style mime.types file for setting
          files' <tt>svn:mime-type</tt> property based on the file
          extension.  The mime-types file might have content like
          this:</p>
<pre>
text/plain              txt
application/msword      doc
</pre>
          <p>This option only has an effect on <tt>svn:eol-style</tt>
          if it is used in combination with
          <tt>--eol-from-mime-type</tt>.</p></td>
      </tr>

      <tr>
        <td align="right"><tt>--eol-from-mime-type</tt></td>
        <td>Set <tt>svn:eol-style</tt> based on the file's mime type
          (if known).  If the mime type starts with "<tt>text/</tt>",
          then the file is treated as a text file; otherwise, it is
          treated as binary.  This option is useful in combination with
          <tt>--auto-props</tt> or <tt>--mime-types</tt>.</td>
      </tr>

      <tr>
        <td align="right"><tt>--default-eol=STYLE</tt></td>
        <td>Usually cvs2svn treats a file as binary unless one of the
          other rules determines that it is not binary and it is not
          marked as binary in CVS.  But if this option is specified,
          then cvs2svn uses the specified style as the default.  STYLE
          can be 'binary' (default), 'native', 'CRLF', 'LF', or 'CR'.
          If you have been diligent about annotating binary files in
          CVS, or if you are confident that the above options will
          catch all of your binary files, then
          <tt>--default-style=native</tt> should give good
          results.</td>
      </tr>

    </table>

  <p>If you don't use any of these options, then cvs2svn will not
    arrange any line-end translation whatsoever.  The file contents in
    the SVN repository should be the same as the contents you would
    get if checking out with CVS on the machine on which cvs2svn is
    run.  This also means that the EOL characters of text files will
    be the same no matter where the SVN data are checked out (i.e.,
    not translated to the checkout machine's EOL format).</p>

  <p>To do a better job, you can use <tt>--auto-props</tt>,
    <tt>--mime-types</tt>, and <tt>--eol-from-mime-type</tt> to
    specify exactly which properties to set on each file based on its
    filename.</p>

  <p>For total control over setting properties on files, you can use
    the <a
    href="cvs2svn.html#options-file-method"><tt>--options</tt>-file
    method</a> and write your own <tt>FilePropertySetter</tt> or
    <tt>RevisionPropertySetter</tt> in Python.  For example,</p>
<pre>
from cvs2svn_lib.property_setters import FilePropertySetter

class MyPropertySetter(FilePropertySetter):
  def set_properties(self, cvs_file):
    if cvs_file.cvs_path.startswith('path/to/funny/files/'):
      cvs_file.properties['svn:mime-type'] = 'text/plain'
      cvs_file.properties['svn:eol-style'] = 'CRLF'

ctx.file_property_setters.append(MyPropertySetter())
</pre>
  <p>Please note that <a href="#options-code">the class must be
    defined in a separate file</a>.</p>

  <p>See the file <tt>cvs2svn_lib/property_setters.py</tt> for many
    examples of property setters.</p>


<h3><a name="path-symbol-transforms" title="#path-symbol-transforms">I
  want a single project but tag-rewriting rules that vary by
  subdirectory.  Can this be done?</a></h3>

  <p>This is an example of how the cvs2svn conversion can be
    customized using Python.</p>

  <p>Suppose you want to write symbol transform rules that are more
    complicated than "replace REGEXP with PATTERN".  This can easily
    be done by writing just a little bit of Python code.</p>

  <p>When a symbol is encountered, cvs2svn iterates through the list
    of <tt>SymbolTransform</tt> objects defined for the project.  For
    each one, it calls <tt>symbol_transform.transform(cvs_file,
    symbol_name, revision)</tt>.  That method can return
    any legal symbol name, which will be used in the conversion
    instead of the original name.</p>

  <p>To use this feature, you will have to use
    an <a href="cvs2svn.html#options-file-method">options file</a> to
    start the conversion.  You then write a new SymbolTransform class
    that inherits from RegexpSymbolTransform but checks the path
    before deciding whether to transform the symbol.  You can do
    something like the following:</p>

<pre>
from cvs2svn_lib.symbol_transform import RegexpSymbolTransform

class MySymbolTransform(RegexpSymbolTransform):
    def __init__(self, path, pattern, replacement):
        """Transform only symbols that occur within the specified PATH."""

        self.path = path
        RegexpSymbolTransform.__init__(self, pattern, replacement)

    def transform(self, cvs_file, symbol_name, revision):
        # Is the file is within the path we are interested in?
        if cvs_file.cvs_path.startswith(path + '/'):
            # Yes -> Allow RegexpSymbolTransform to transform the symbol:
            return RegexpSymbolTransform.transform(
                    self, cvs_file, symbol_name, revision)
        else:
            # No -> Return the symbol unchanged:
            return symbol_name

# Note that we use a Python loop to fill the list of symbol_transforms:
symbol_transforms = []
for subdir in ['project1', 'project2', 'project3']:
    symbol_transforms.append(
        MySymbolTransform(
            subdir,
            r'release-(\d+)_(\d+)',
            r'%s-release-\1.\2' % subdir))

# Now register the project, using our own symbol transforms:
run_options.add_project(
    'your_cvs_path',
    trunk_path='trunk',
    branches_path='branches',
    tags_path='tags',
    symbol_transforms=symbol_transforms))
</pre>

  <p>Please note that <a href="#options-code">the class must be
    defined in a separate file</a>.</p>

  <p>This example causes any symbol under "project1" that looks like
    "release-3_12" to be transformed into a symbol named
    "project1-release-3.12", whereas if the same symbol appears under
    "project2" it will be transformed into
    "project2-release-3.12".</p>


<h3><a name="cvsnt" title="#cvsnt">How can I convert a CVSNT
    repository?</a></h3>

  <p><a href="http://www.cvsnt.org/">CVSNT</a> is a version control
    system that started out by adding support for running CVS under
    Windows NT.  Since then it has made numerous extensions to the RCS
    file format, to the point where CVS compatibility does not imply
    CVSNT compatibility with any degree of certainty.</p>

  <p>cvs2svn <em>might</em> happen to successfully convert a CVSNT
    repository, especially if the repository has never had any
    CVSNT-only features used on it, but <b>this use is not supported
    and should not be expected to work</b>.</p>

  <p>If you want to experiment with converting a CVSNT repository,
    then please consider the following suggestions:</p>

  <ul>
    <li>Use cvs2svn's <tt>--use-cvs</tt> option.</li>

    <li>Use CVSNT's version of the <tt>cvs</tt> executable (i.e.,
      ensure that the first <tt>cvs</tt> program in your $PATH is the
      one that came with CVSNT).</li>

    <li>Carefully check the result of the conversion before you rely
      on it, <em>even if the conversion completed without any
      errors or warnings</em>.</li>

  </ul>

  <p>Patches to support the conversion of CVSNT repositories would, of
    course, be welcome.</p>


<h3><a name="osxsetup" title="#osxsetup">How do I get cvs2svn to run
on OS X 10.5.5?</a></h3>

<p>Attempting to run cvs2svn on a standard OS X 10.5.5 installation
yields the following error:</p>

<blockquote> <p> ERROR: cvs2svn uses the anydbm package, which depends on
lower level dbm libraries.  Your system has dbm, with which cvs2svn is
known to have problems.  To use cvs2svn, you must install a Python dbm
library other than dumbdbm or dbm.  See <a
href="http://python.org/doc/current/lib/module-anydbm.html">http://python.org/doc/current/lib/module-anydbm.html</a>
for more information. </p> </blockquote>

<p>The problem is that the standard distribution of python on OS X
10.5.5 does not include any other dbm libraries other than the
standard dbm.  In order for cvs2svn to work, we need to install the
gdbm library, in addition to a new version of python that enables the
python gdbm module.</p>

<p>The precompiled versions of python for OS X available from
python.org or activestate.com (currently version 2.6.2) do not have
gdbm support turned on.  To check for gdbm support, check for the
library module (<code>libgdmmodule.so</code>) within the python
installation.</p>

<p>Here is the procedure for a successful installation of cvs2svn and
all supporting libs:</p>

<ol>

  <li>Download the gdbm-1.8.3 (or greater) source, unarchive and
    change directory to gdbm-1.8.3. We need to install the gdbm
    libraries so python's gdbm module can use them.

  <ol>

    <li>Type <code>./configure</code></li>

    <li>Edit "Makefile" so that the owner and group are not the
        non-existing "bin" owner and group by changing

<pre>
BINOWN = bin
BINGRP = bin
</pre>
to
<pre>
BINOWN = root
BINGRP = admin
</pre>

    </li>

    <li>Type "make"</li>

    <li>Type "sudo make install"</li>

  </ol>

  </li>

  <li>Download the Python2.6 (or greater) source, unarchive, and
  change directory to Python2.6.  We need to enable python gdbm
  support which is not enabled in the default OS X 10.5.5 installation
  of python, as the gdbm libs are not included.  However, we just
  installed the gdbm libs in step 1, so we can now compile python with
  gdbm support.

  <ol>

    <li>Edit the file "Modules/Setup" by uncommenting the line which
      links against gdbm by changing

<pre>
#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
</pre>
to
<pre>
gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
</pre>
    </li>

    <li>Edit the file "Modules/Setup" by uncommenting the line to
      create shared libs by changing

<pre>
#*shared*
</pre>
to
<pre>
*shared*
</pre>
    </li>

    <li>Type <code>./configure --enable-framework
    --enable-universalsdk</code> in the top-level
    Python2.6 directory.  This will configure the installation of
    python as a shared OS X framework, and usable with OS X GUI
    frameworks and SDKs. You may have problems building if you don't
    have the SDKs that support the PPC platform. If you do, just
    specify <code>--disable-universalsdk</code>.
    By default, python will be installed in
    "/Library/Frameworks/Python.framework", which is what we
    want.</li>

    <li>Type <code>make</code></li>

    <li>Type <code>sudo make install</code></li>

    <li>Type <code>cd /usr/local/bin; sudo ln -s python2.6 python</code></li>

    <li>Make sure "/usr/local/bin" is at the front of your search path
    in ~/.profile or ~/.bashrc etc.</li>

    <li>Type <code>source ~/.profle</code> or <code>source
    ~/.bashrc</code> etc. or alternatively, just open a new shell
    window.  When you type <code>which python</code> it should give
    you the new version in "/usr/local/bin" <strong>not</strong> the
    one in "/usr/bin".</li>

  </ol>

  </li>

  <li>Download the cvs2svn-2.2.0 (or greater) source, unarchive and
  change directory to cvs2svn-2.2.0.  Many people can't get cvs2svn to
  work except in the installation directory.  The reason for this is
  that the installation places copies of cvs2svn, cvs2svn_libs, and
  cvs2svn_rcsparse in the /Library/Frameworks/Python.framework
  hierarchy.  All we need to do is make a link in /usr/local/bin
  pointing to the location of cvs2svn in the python framework
  hierarchy.  And for good measure we also make links to the lib and
  include directories:

  <ol>

    <li>Type <code>sudo make install</code></li>

    <li>Create the required links by typing the following:

<pre>
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/bin/cvs2svn /usr/local/bin/cvs2svn
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /usr/local/lib/python2.6
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 /usr/local/include/python2.6
</pre>

    </li>

  </ol>

  </li>

</ol>

<p>The installation is complete. Change directory out of the
cvs2svn-2.2.0 installation directory, and you should be able to run
cvs2svn. Be careful *not* to copy the version of cvs2svn in the
cvs2svn-2.2.0 installation directory to /usr/local/bin, as this has a
different python environment setting at the top of the file than the
one that was installed in the /Library/Frameworks/Python.framework
hierarchy. Follow the instructions exactly, and it should work.
</p>


<hr />

<h2>Problems:</h2>

<h3><a name="atticprob" title="#atticprob">I get an error "A CVS
    repository cannot contain both repo/path/file.txt,v and
    repo/path/Attic/file.txt,v".  What can I do?</a></h3>

<p>Background: Normally, if you have a file called
<tt>path/file.txt</tt> in your project, CVS stores its history in a
file called <tt>repo/path/file.txt,v</tt>.  But if <tt>file.txt</tt>
is deleted on the main line of development, CVS moves its history file
to a special <tt>Attic</tt> subdirectory:
<tt>repo/path/Attic/file.txt,v</tt>.  (If the file is recreated, then
it is moved back out of the <tt>Attic</tt> subdirectory.)  Your
repository should never contain both of these files at the same
time.</p>

<p>This cvs2svn error message thus indicates a mild form of corruption
in your CVS repository.  The file has two conflicting histories, and
even CVS does not know the correct history of <tt>path/file.txt</tt>.
The corruption was probably created by using tools other than CVS to
backup or manipulate the files in your repository.  With a little work
you can learn more about the two histories by viewing each of the
<tt>file.txt,v</tt> files in a text editor.</p>

<p>There are four straightforward approaches to fixing the repository
corruption, but each has potential disadvantages.  Remember to <b>make
a backup</b> before starting.  Never run cvs2svn on a live CVS
repository--always work on a copy of your repository.</p>

<ol>
  <li>Restart the conversion with the
    <tt>--retain-conflicting-attic-files</tt> option.  This causes the
    non-attic and attic versions of the file to be converted
    separately, with the <tt>Attic</tt> version stored to a new
    subdirectory as <tt>path/Attic/file.txt</tt>.  This approach
    avoids losing any history, but by moving the <tt>Attic</tt>
    version of the file to a different subdirectory it might cause
    historical revisions to be broken.</li>

  <li>Remove the <tt>Attic</tt> version of the file and restart the
    conversion.  Sometimes it represents an old version of the file
    that was deleted long ago, and it won't be missed.  But this
    completely discards one of the file's histories, probably causing
    <tt>file.txt</tt> to be missing in older historical revisions.
    (For what it's worth, this is probably how CVS would behave in
    this situation.)

    <pre>
      # You did make a backup, right?
      $ rm repo/path/Attic/file.txt,v
    </pre></li>

  <li>Remove the non-<tt>Attic</tt> version of the file and restart
    the conversion.  This might be appropriate if the
    non-<tt>Attic</tt> version has less important content than the
    <tt>Attic</tt> version.  But this completely discards one of the
    file's histories, probably causing <tt>file.txt</tt> to be missing
    in recent historical revisions.

    <pre>
      # You did make a backup, right?
      $ rm repo/path/file.txt,v
    </pre></li>

  <li>Rename the non-<tt>Attic</tt> version of the file and restart
    the conversion.  This avoids losing history, but it changes the
    name of the non-<tt>Attic</tt> version of the file to
    <tt>file-not-from-Attic.txt</tt> whenever it appeared, and might
    thereby cause revisions to be broken.

    <pre>
      # You did make a backup, right?
      $ mv repo/path/file.txt,v repo/path/file-not-from-Attic.txt,v
    </pre></li>

</ol>

<p>If you run cvs2svn on a case-insensitive operating system, it is
possible to get this error even if the filename of the file in
Attic has different case than the one out of the Attic.  This could
happen, for example, if the CVS repository was served from a
case-sensitive operating system at some time.  A workaround for this
problem is to copy the CVS repository to a case-sensitive operating
system and convert it there.
</p>


<h3><a name="rcsfileinvalid" title="#rcsfileinvalid">I get an error
    "ERROR: <i>filename</i>,v is not a valid ,v file."</a></h3>

<p>The named file is corrupt in some way.  (Corruption is surprisingly
common in CVS repositories.)  It is likely that even CVS has problems
with this file; try checking out the head revision, revision 1.1, and
the tip revision on each branch of this file; probably one or more of
them don't work.</p>

<p>Here are some options:</p>

<ol>

  <li>Omit this file from the conversion (by making a copy of your
    repository, deleting this file from the copy, then converting from
    the copy).</li>

  <li>Restore an older copy of this file from backups, if you have
    backups from before it was corrupted.</li>

  <li>Hand-fix the file as best you can by opening it in a binary
    editor and trying to put it back in RCS file format (documented in
    the rcsfile(5) manpage).  Often it is older revisions that are
    affected by corruption; you might need to delete some old
    revisions to salvage newer ones.</li>

</ol>


<h3><a name="gdbm-nfs" title="#gdbm-nfs">gdbm.error: (45, 'Operation
    not supported')</a></h3>

<p>This has been reported to be caused by trying to create gdbm
databases on an NFS partition.  Apparently gdbm does not support
databases on NFS partitions.  The workaround is to use the
<tt>--tmpdir</tt> option to choose a local partition for cvs2svn to
write its temporary files.</p>


<h3><a name="apple-single" title="#apple-single">When converting a CVS
    repository that was used on a Macintosh, the contents of some
    files are incorrect in SVN.</a></h3>

<p>Some Macintosh CVS clients use a nonstandard trick to store the
resource fork of files in CVS: instead of storing the file contents
directly, store an <a
href="http://rfc.net/rfc1740.html">AppleSingle</a> data stream
containing both the data fork and resource fork.  When checking the
file out, the client unpacks the AppleSingle data and writes the two
forks separately to disk.  By default, cvs2svn treats the file
contents literally, so when you check the file out of Subversion, the
file contains the combined data in AppleSingle format rather than only
the data fork of the file as expected.</p>

<p>Subversion does not have any special facilities for dealing with
Macintosh resource forks, so there is nothing cvs2svn can do to
preserve both forks of your data.  However, sometimes the resource
fork is not needed.  If you would like to discard the resource fork
and only record the data fork in Subversion, then start your
conversion using the <a
href="cvs2svn.html#options-file-method">options file method</a> and
set the following option to <tt>True</tt> in your options file:</p>

<pre>
      ctx.decode_apple_single = True
</pre>

<p>There is more information about this option in the comments in
<tt>cvs2svn-example.options</tt>.</p>


<h3><a name="rcsmissing" title="#installrcs">Using cvs2svn 1.3.x, I
    get an error "The command '['co', '-q', '-x,v', '-p1.1', '-kk',
    '/home/cvsroot/myfile,v']' failed" in pass 8.</a></h3>

<p><i>What are you using cvs2svn version 1.3.x for anyway?
Upgrade!</i></p>

<p>But if you must, either install RCS, or ensure that CVS is
installed and use cvs2svn's <a
href="cvs2svn.html#use-cvs"><tt>--use-cvs</tt></a> option.</p>


<h3><a name="nonstandardntdb" title="#nonstandardntdb">Vendor
    branches created with "cvs import -b &lt;branch number&gt;"
    are not correctly handled.</a></h3>

<p>Normally, people using "cvs import" don't specify the
"-b" flag.  cvs2svn handles this normal case fine.</p>

<p>If you have a file which has an <i>active</i> vendor branch, i.e.
there have never been any trunk commits but only "cvs imports" onto
the vendor branch, then cvs2svn will handle this fine.  (Even if
you've used the "-b" option to specify a non-standard branch
number).</p>

<p>If you've used "cvs import -b &lt;branch number&gt;", you didn't
specify the standard CVS vendor branch number of 1.1.1, and there
has since been a commit on trunk (either a modification or delete),
then your history has been damaged.  This isn't cvs2svn's fault.
CVS simply doesn't record the branch number of the old vendor branch,
it assumes it was 1.1.1.  You will even get the wrong results from
"cvs checkout -D" with a date when the vendor branch was active.</p>

<p>Symptoms of this problem can include:</p>

<ul>
<li>cvs2svn refusing to let you exclude the vendor branch, because
some other branch depends on it</li>
<li>if you did more than one import onto the vendor branch, then
your SVN history "missing" one of the changes on trunk (though
the change will be on the vendor branch).</li>
</ul>

<p>(Note: There are other possible causes for these symptoms, don't
assume you have a non-standard vendor branch number just because
you see these symptoms).</p>

<p>The way to solve this problem is to renumber the vendor branch to
the standard 1.1.1 branch number.  This has to be done before you run
cvs2svn.  To help you do this, there is the "renumber_branch.py"
script in the "contrib" directroy of the cvs2svn distribution.</p>

<p>The typical usage, assuming you used "cvs import -b 1.1.2 ..."
to create your vendor branch, is:</p>
<pre>
      contrib/renumber_branch.py 1.1.2 1.1.1 repos/dir/file,v
</pre>
<p>You should only run this on a <b>copy</b> of your CVS repository,
as it edits the repository in-place.  You can fix a single file or a
whole directory tree at a time.</p>

<p>The script will check that the 1.1.1 branch doesn't already exist;
if it does exist then it will fail with an error message.</p>



<h2>Getting help:</h2>

<h3><a name="gettinghelp" title="#gettinghelp">How do I get
help?</a></h3>

<p>There are several sources of help for cvs2svn:</p>

<ul>

  <li>The <a href="cvs2svn.html">user manual</a> not only describes
  how to run cvs2svn, but also discusses some limitations, pitfalls,
  and conversion strategies.  Please note that the <a
  href="http://cvs2svn.tigris.org/cvs2svn.html">online manual</a>
  describes the latest "bleeding edge" trunk version of the software,
  which may be different than the version that you are using.</li>

  <li>The <a href="faq.html">frequently asked questions (FAQ) list</a>
  is the document that you are now reading.  Please make sure you've
  scanned through the list of topics to see if your question is
  already answered.</li>

  <li>The <a
  href="http://cvs2svn.tigris.org/servlets/ProjectMailingListList">mailing
  list archives</a>.  Maybe your question has already
  been discussed on either the <tt>user@cvs2svn.tigris.org</tt> or
  <tt>dev@cvs2svn.tigris.org</tt> mailing list.</li>

  <li>The <a href="mailto:users@cvs2svn.tigris.org"><tt>users@cvs2svn.tigris.org</tt></a>
  mailing list can often help with questions about how to configure
  and run cvs2svn, conversion strategies, or problems converting your
  repository.
  Please <a href="http://cvs2svn.tigris.org/servlets/ProjectMailingListList">subscribe</a>
  to the list so that you can follow ensuing discussions.  Be sure to
  include the information listed in <a href="#infoneeded">"What
  information should I include when requesting help?"</a></li>

  <li>You can also ask questions
  on <a href="irc://irc.freenode.net/#cvs2svn">the <tt>#cvs2svn</tt>
  channel on irc.freenode.net</a>.</li>

  <li>If you think you have found a bug, please refer to <a
  href="#reportingbugs">"How do I report a bug?"</a></li>

  <li>For individual help with your conversion (especially for
  non-open-source projects), <a href="#commercialsupport">commercial
  support is available</a>.</li>

</ul>


<h3><a name="infoneeded" title="#infoneeded">What information should I
include when requesting help?</a></h3>

<p>If you ask for help and/or report a bug on a mailing list, it is
important that you include the following information.  Failure to
include important information is the best way to dissuade the
volunteers of the cvs2svn project from trying to help you.</p>

<ol>

  <li><em>Exactly what version</em> of cvs2svn are you using?  If you
  are not using an official release, please tell us what branch and
  revision number from the <a
  href="http://cvs2svn.tigris.org/svn/cvs2svn/">svn archive</a> you
  are using.  If you have modified cvs2svn, please tell us exactly
  what you have changed.</li>

  <li>What platform are you using (Linux, BSD, Windows, etc.)?  What
  python version (e.g., type <tt>python --version</tt>)?</li>

  <li>What is the <em>exact command line</em> that you used to start
  the conversion?  If you used the <tt>--options</tt> option, please
  attach a copy of the options file that you used.</li>

  <li>What happened when you ran the program?  How did that differ
  from what you wanted/expected?  Include transcripts and/or error
  output if available.</li>

  <li>If you think you have found a bug, try to submit a repository
  that we can use to reproduce the problem.
  See <a href="#testcase">"How can I produce a useful test case?"</a>
  for more information.  In most cases, if we cannot reproduce the
  problem, there is nothing we can do to help you.</li>

</ol>


<h3><a name="subscribing" title="#subscribing">How do I subscribe to a
mailing list?</a></h3>

<p>It is not so obvious how to subscribe to the cvs2svn mailing
lists.  There are two ways:</p>

<ul>

  <li>If you have an account on tigris.org, then you can go to any
  cvs2svn project page, click on "Mailing lists" in the "Project
  tools" menu on the left-hand column, then click on <a
  href="http://cvs2svn.tigris.org/ds/manageSubscriptions.do">"Manage
  my subscriptions"</a> (above the list of mailing lists).  On that
  page, tick the "Subscribed" checkbox next to the lists to which you
  would like to subscribe.</li>

  <li>If you do not have a tigris account, then you can subscribe by
  sending an email to $LIST-subscribe@cvs2svn.tigris.org, where $LIST
  is one of "announce", "users", "dev", "issues", or "commits".  Please
  be sure to send the email to $LIST-subscribe and not to the list
  itself!  (To unsubscribe, send and email to
  $LIST-unsubscribe@cvs2svn.tigris.org.)  More details can be found <a
  href="http://help.collab.net/index.jsp?topic=/faq/subscribetomailinglistviaemail.html">here</a>.</li>

</ul>


<h3><a name="reportingbugs" title="#reportingbugs">How do I report a
bug?</a></h3>

<p>cvs2svn is an open source project that is largely developed and
supported by volunteers in their free time.  Therefore please try to
help out by reporting bugs in a way that will enable us to help you
efficiently.</p>

<p>The first question is whether the problem you are experiencing is
caused by a cvs2svn bug at all.  A large fraction of reported "bugs"
are caused by problems with the user's CVS repository, especially mild
forms of repository corruption or <a href="#cvsnt">trying to convert a
CVSNT repository with cvs2svn</a>.  Please also double-check the <a
href="cvs2svn.html">manual</a> to be sure that you are using the
command-line options correctly.</p>

<p>A good way to localize potential repository corruption is to use
the <tt>shrink_test_case.py</tt> script (which is located in the
<tt>contrib</tt> directory of the cvs2svn source tree).  This script
tries to find the minimum subset of files in your repository that
still shows the same problem.  <b>Warning: Only apply this script to a
backup copy of your repository, as it destroys the repository that it
operates on!</b> Often this script can narrow the problem down to a
single file which, as often as not, is corrupt in some way.  Even if
the problem is not in your repository, the shrunk-down test case will
be useful for reporting the bug.  Please see <a href="#testcase">"How
can I produce a useful test case?"</a> and the comments at the top of
<tt>shrink_test_case.py</tt> for information about how to use this
script.</p>

<p>Assuming that you still think you have found a bug, the next step
is to investigate whether the bug is already known.  Please look
through the <a
href="http://cvs2svn.tigris.org/issue_tracker.html">issue tracker</a>
for bugs that sound familiar.  If the bug is already known, then there
is no need to report it (though possibly you could contribute a <a
href="#testcase">useful test case</a> or a workaround).</p>

<p>If your bug seems new, then the best thing to do is report it via
email to
the <a href="http://cvs2svn.tigris.org/servlets/ProjectMailingListList">dev@cvs2svn.tigris.org</a>
mailing list.  Be sure to include the information listed
in <a href="#infoneeded">"What information should I include when
requesting help?"</a></p>


<h3><a name="testcase" title="#testcase">How can I produce a useful
test case?</a></h3>

<p>If you need to <a href="#reportingbugs">report a bug</a>, it is
extremely helpful if you can include a test repository with your bug
report.  In most cases, if we cannot reproduce the problem, there is
nothing we can do to help you.  This section describes ways to
overcome the most common problems that people have in producing a
useful test case.  When you have a reasonable-sized test case (say
under 1 MB--the smaller the better), you can just tar it up and attach
it to the email in which you report the bug.</p>

<h4>If the repository is too big and/or contains proprietary information</h4>

<p>You don't want to send us your proprietary information, and we
don't want to receive it either.  Short of open-sourcing your
software, here is a way to strip out most of the proprietary
information and simultaneously reduce the size of the archive
tremendously.</p>

<p>The <tt>destroy_repository.py</tt> script tries to delete as much
information as possible out of your repository while still preserving
its basic structure (and therefore hopefully any cvs2svn bugs).
Specifically, it tries to delete file descriptions, text content, all
nontrivial log messages, and all author names.  It also renames all
files and directories to have generic names (e.g.,
<tt>dir015/file053,v</tt>).  (It does not affect the number and dates
of revisions to the files.)</p>

<ol>

  <li>This procedure will <b>destroy the repository</b> that it is
  applied to, so be sure to <b>make a backup copy of your
  repository and work with the backup!</b></li>

  <li>Make sure you have the <tt>destroy_repository.py</tt> script.
  If you don't already have it, you should <a
  href="http://cvs2svn.tigris.org/servlets/ProjectSource">download the
  source code</a> for cvs2svn (there is no need to install it).  The
  script is located in the <tt>contrib</tt> subdirectory.</li>

  <li>Run <tt>destroy_repository.py</tt> by typing <pre>
# You did make a backup, right?
/path/to/config/destroy_repository.py /path/to/copy/of/repo
</pre></li>

  <li>Verify that the "destroyed" archive does not include any
  information that you consider proprietary.  Your data security is
  ultimately your responsibility, and we make no guarantees that the
  <tt>destroy_repository.py</tt> script works correctly.  You can open
  the *,v files using a text editor to see what they contain.</li>

  <li>Try converting the "destroyed" repository using cvs2svn, and
  ensure that the bug still exists.  Take a note of the exact cvs2svn
  command line that you used and include it along with a tarball of
  the "destroyed" repository with your bug report.</li>

</ol>

<p>If running <tt>destroy_repository.py</tt> with its default options
causes the bug to go away, consider using
<tt>destroy_repository.py</tt> command-line options to leave part of
the repository information intact.  Run <tt>destroy_repository.py
--help</tt> for more information.</p>


<h4>The repository is still too large</h4>

<p>This step is a tiny bit more work, so if your repository is already
small enough to send you can skip this step.  But this step helps
narrow down the problem (maybe even point you to a corrupt file in
your repository!) so it is still recommended.</p>

<p>The <tt>shrink_test_case.py</tt> script tries to delete as many
files and directories from your repository as possible while
preserving the cvs2svn bug.  To use this command, you need to write a
little test script that tries to convert your repository and checks
whether the bug is still present.  The script should exit successfully
(e.g., "<tt>exit 0</tt>") if the bug is still <em>present</em>, and
fail (e.g., "<tt>exit 1</tt>") if the bug has <em>disappeared</em>.
The form of the test script depends on the bug that you saw, but it
can be as simple as something like this:</p>

<pre>
#! /bin/sh

cvs2svn --dry-run /path/to/copy/of/repo 2>&amp;1 | grep -q 'KeyError'
</pre>

<p>If the bug is more subtle, then the test script obviously needs to
be more involved.</p>

<p>Once the test script is ready, you can shrink your repository via
the following steps:</p>

<ol>

  <li>This procedure will <b>destroy the repository</b> that it is
  applied to, so be sure to <b>make a backup copy of your
  repository and work with the backup!</b></li>

  <li>Make sure you have the <tt>shrink_test_case.py</tt> script.
  If you don't already have it, you should <a
  href="http://cvs2svn.tigris.org/servlets/ProjectSource">download the
  source code</a> for cvs2svn (there is no need to install it).  The
  script is located in the <tt>contrib</tt> subdirectory.</li>

  <li>Run <tt>shrink_test_case.py</tt> by typing <pre>
# You did make a backup, right?
/path/to/config/shrink_test_case.py /path/to/copy/of/repo testscript.sh
</pre>, where <tt>testscript.sh</tt> is the name of the test script
  described above.  This script will execute <tt>testscript.sh</tt>
  many times, each time using a subset of the original repository.</li>

  <li>If the shrunken repository only consists of one or two files,
  look inside the files with a text editor to see whether they are
  corrupted in any obvious way.  (Many so-called cvs2svn "bugs" are
  actually the result of a corrupt CVS repository.)</li>

  <li>Try converting the "shrunk" repository using cvs2svn, to make
  sure that the original bug still exists.  Take a note of the exact
  cvs2svn command line that you used, and include it along with a
  tarball of the "destroyed" repository with your bug report.</li>

</ol>


<h3><a name="commercialsupport" title="#commercialsupport">Does
anybody offer commercial support for cvs2svn/cvs2git
conversions?</a></h3>

<p><b>Disclaimer:</b>These links in this section are provided as a
service to cvs2svn/cvs2git users.  Neither Tigris.org, CollabNet
Inc., nor the cvs2svn team guarantee the correctness, validity or
usefulness of these links.  To add a link to this section, please
submit it to the cvs2svn developers' mailing list.</p>

<p>Following is a list of known sources for commercial support for
cvs2svn/cvs2git conversions:</p>

<ul>

  <li>Michael Haggerty, the maintainer of cvs2svn/cvs2git, offers
  individual help with conversions, including implementation of new
  cvs2svn/cvs2git features, on a consulting basis.  Please contact
  Michael <a href="mailto:mhagger@alum.mit.edu?Subject=cvs2svn%20consulting%20request">via
  email</a> for more information.</li>

</ul>


</div>
</body>
</html>
